package org.yinweichen.llm_dataset_backend.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.yinweichen.llm_dataset_backend.entity.OriginalAnswer;
import org.yinweichen.llm_dataset_backend.entity.OriginalAnswerId;
import org.yinweichen.llm_dataset_backend.entity.OriginalQuestion;
import java.util.List;

public interface OriginalAnswerRepository extends JpaRepository<OriginalAnswer, OriginalAnswerId> {

    /**
     * 根据原始问题ID和版本查找对应的回答
     * @param originalQuestionId 原始问题ID
     * @param version 版本号
     * @return 回答列表
     */
    List<OriginalAnswer> findByOriginalQuestionIdAndVersion(Long originalQuestionId, String version);

    boolean existsById(Long id);
}
